﻿@{
    var dt = ViewData["dt"] as System.Data.DataTable;
    ViewBag.Title = "激活会员卡";
    Layout = "~/Views/Shared/_BootstrapUI.cshtml";
}

<div class="login-form">

    <div class="login-content" id="form">

        <div class="form-login-error" style="text-align:center">
            <h3>卡号激活</h3>
        </div>

        <div class="form-group">
            <div class="input-group" style="width:100%">
                <div class="input-group-addon" style="width:131px;text-align:right">
                    <i class="fa">会员姓名</i>
                </div>
                <input type="text" class="form-control" name="name" id="name" value="@(dt.Rows.Count >0?dt.Rows[0]["name"]:"")" placeholder="请填写会员姓名" autocomplete="off" />
            </div>
        </div>
        <div class="form-group">
            <div class="input-group" style="width:100%">
                <div class="input-group-addon" style="width:131px;text-align:right">
                    <i class="fa">会员性别</i>
                </div>
                <select type="text" class="form-control" name="sex" id="sex" value="@(dt.Rows.Count >0?dt.Rows[0]["sex"]:"")" placeholder="请填写用户名" autocomplete="off">
                    @if (dt.Rows.Count > 0 && dt.Rows[0]["sex"].ToString() == "0")
                    {
                        <option selected="selected" value="0">男</option>
                        <option value="1">女</option>
                    }
                    else
                    {
                        <option value="0">男</option>
                        <option selected="selected" value="1">女</option>
                    }
                </select>
            </div>
        </div>
        <div class="form-group">
            <div class="input-group" style="width:100%">
                <div class="input-group-addon" style="width:131px;text-align:right">
                    <i class="fa">电话</i>
                </div>
                <input type="text" class="form-control" name="mobile" id="mobile" value="@(dt.Rows.Count >0?dt.Rows[0]["mobile"]:"")" placeholder="请填写电话" autocomplete="off" />
            </div>
        </div>

        <div class="form-group">
            <div class="input-group" style="width:100%">
                <div class="input-group-addon" style="width:131px;text-align:right">
                    <i class="fa">身份证号</i>
                </div>
                <input type="text" class="form-control" name="cardno" id="cardno" value="@(dt.Rows.Count >0?dt.Rows[0]["cardno"]:"")" placeholder="请填写身份证号" autocomplete="off" />
            </div>
        </div>

        <div class="form-group">
            <div class="input-group" style="width:100%">
                <div class="input-group-addon" style="width:131px;text-align:right">
                    <i class="fa">血型</i>
                </div>
                <select id="bloodType" type="text" placeholder="血型" class="form-control  input-sm input-sm" required="required" data-parsley-error-message="请输入血型...">
                    @{
                        var boolType = new FZKJ.BLL.sys_dict().GetModelList(" value='bloodType'");
                        if (boolType.Count > 0)
                        {
                            var lists1 = new FZKJ.BLL.sys_dict().GetModelList(" pid='" + boolType[0].id + "'");
                            foreach (var item in lists1)
                            {
                                if (dt.Rows.Count > 0 && dt.Rows[0]["bloodType"].ToString() == item.label)
                                {
                                    <option selected="selected" value="@item.label">@item.label</option>
                                }
                                else
                                {
                                    <option value="@item.label">@item.label</option>
                                }
                            }
                        }
                    }
                </select>

            </div>
        </div>


        <div class="form-group">
            <div class="input-group" style="width:100%">
                <div class="input-group-addon" style="width:131px;text-align:right">
                    <i class="fa">病史</i>
                </div>
                <input type="text" class="form-control" name="illnesshistory" id="illnesshistory" value="@(dt.Rows.Count >0?dt.Rows[0]["illnesshistory"]:"")" placeholder="请填写病史" autocomplete="off" />
            </div>
        </div>

        <div class="form-group">
            <div class="input-group" style="width:100%">
                <div class="input-group-addon" style="width:131px;text-align:right">
                    <i class="fa">紧急联系人</i>
                </div>
                <input type="text" class="form-control" name="emergencycontact" id="emergencycontact" value="@(dt.Rows.Count >0?dt.Rows[0]["emergencycontact"]:"")" placeholder="请填写紧急联系人" autocomplete="off" />
            </div>
        </div>


        <div class="form-group">
            <div class="input-group" style="width:100%">
                <div class="input-group-addon" style="width:131px;text-align:right">
                    <i class="fa">紧急联系人电话</i>
                </div>
                <input type="text" class="form-control" name="emergencycontactmobile" id="emergencycontactmobile" value="@(dt.Rows.Count >0?dt.Rows[0]["emergencycontactmobile"]:"")" placeholder="请填写紧急联系人电话" autocomplete="off" />
            </div>
        </div>

        <div class="form-group">
            <div class="input-group" style="width:100%">
                <div class="input-group-addon" style="width:131px;text-align:right">
                    <i class="fa">保单号</i>
                </div>
                <input type="text" class="form-control" name="policynumber" id="policynumber" value="@(dt.Rows.Count >0?dt.Rows[0]["policynumber"]:"")" placeholder="请填写保单号" autocomplete="off" />
            </div>
        </div>

        <div class="form-group">
            <div class="input-group" style="width:100%">
                <div class="input-group-addon" style="width:131px;text-align:right">
                    <i class="fa">保单公司</i>
                </div>
                <select id="company" name="company" type="text" class="form-control  input-sm input-sm" required="required">
                    @{
                        var bll = new FZKJ.BLL.sys_dict();
                        var list = bll.GetModelList(" value='insurancecompany'");
                        if (list.Count > 0)
                        {
                            var lists = bll.GetModelList(" pid='" + list[0].id + "'");
                            foreach (var item in lists)
                            {
                                if (dt.Rows.Count > 0 && dt.Rows[0]["company"].ToString() == item.id.ToString())
                                {
                                    <option selected value="@item.id">@item.label</option>
                                }
                                else
                                {
                                    <option value="@item.id">@item.label</option> }
                            }
                        }
                    }
                </select>

            </div>
        </div>

        <div class="form-group">
            <div class="input-group" style="width:100%">
                <div class="input-group-addon" style="width:131px;text-align:right">
                    <i class="fa">代理公司</i>
                </div>
                <input type="text" class="form-control" name="insureanceAgent" id="insureanceAgent" value="@(dt.Rows.Count >0?dt.Rows[0]["insureanceAgent"]:"")" placeholder="请填写代理公司" autocomplete="off" />
            </div>
        </div>

        <div class="form-group">
            <div class="input-group" style="width:100%">
                <div class="input-group-addon" style="width:131px;text-align:right">
                    <i class="fa">车牌号</i>
                </div>
                <input type="text" class="form-control" name="numberplate" id="numberplate" value="@(dt.Rows.Count >0?dt.Rows[0]["numberplate"]:"")" placeholder="请填写车牌号" autocomplete="off" />
            </div>
        </div>


        <div class="form-group">
            <div class="input-group" style="width:100%">
                <div class="input-group-addon" style="width:131px;text-align:right">
                    <i class="fa">VIN码</i>
                </div>
                <input type="text" class="form-control" name="VIN" id="VIN" placeholder="请填写VIN码" value="@(dt.Rows.Count >0?dt.Rows[0]["VIN"]:"")" autocomplete="off" />
            </div>
        </div>
        <div class="form-group">
            <div class="input-group" style="width:100%">
                <div class="input-group-addon" style="width:131px;text-align:right">
                    <i class="fa">发动机号</i>
                </div>
                <input type="text" class="form-control" name="driving" id="driving" value="@(dt.Rows.Count >0?dt.Rows[0]["driving"]:"")" placeholder="请填写发动机号" autocomplete="off" />
            </div>
        </div>
        @if (ViewBag.isExist == false)
        {
            <div class="form-group">
                <div class="input-group" style="width:100%">
                    <div class="input-group-addon" style="width:131px;text-align:right">
                        <i class="fa">卡号</i>
                    </div>
                    <input type="text" class="form-control" name="card" id="card" placeholder="请填写卡号" autocomplete="off" />
                </div>
            </div>
            @*<div class="form-group">
                <div class="input-group" style="width:100%">
                    <div class="input-group-addon" style="width:131px;text-align:right">
                        <i class="fa">密码</i>
                    </div>
                    <input type="text" class="form-control" name="password" id="password" placeholder="请填写密码" autocomplete="off" />
                </div>
            </div>*@
            <div class="form-group">
                <input type="checkbox" id="agree" style="margin-left:5%" />同意<a href="Protocol">正航兴救救援协议</a>
            </div>
            <div class="form-group">
                <button class="btn btn-primary btn-block btn-login" id="activity">
                    <i class="fa fa-sign-in"></i>
                    激活
                </button>
            </div>
        }
        else
        {
            <div class="form-group">
                <div class="input-group" style="width:100%">
                    <div class="input-group-addon" style="width:131px;text-align:right">
                        <i class="fa">服务</i>
                    </div>
                    <h3>升级全国会员</h3>
                </div>
            </div>
            <div class="form-group">
                <button class="btn btn-primary btn-block btn-login" id="upToGloab" onclick="HrefToGlobal()">
                    <i class="fa fa-sign-in"></i>
                    下一步填写全国会员卡信息
                </button>
            </div>

            <script>
                $("#mobile").attr("readOnly", "true");
            </script>
        }
    </div>
</div>
<script src="~/Pscripts/WeChat/Action.js?v=@DateTime.Now.ToString("yyyMMddHHmmssfff")"></script>